extends Resource

var monster_dict = {}
var monster_group_dict = {"G0": ["M00", "M02"], "G1": ["M03"]}

var monster_statue_dict = {"G0": ["S0"], "G1": ["S0"]}


func load_monsters():
	var tres_files = []
	for i in range(999):
		if i < 10:
			var file_path = (
				"res://src/monsters/detail/0" + str(i) + "/card_monster_simple0" + str(i) + ".tres"
			)
			if ResourceLoader.exists(file_path):
				print("发现资源文件" + file_path)
				tres_files.append(ResourceLoader.load(file_path))
			else:
				break
		else:
			var file_path = (
				"res://src/monsters/detail/" + str(i) + "/card_monster_simple" + str(i) + ".tres"
			)
			if ResourceLoader.exists(file_path):
				print("发现资源文件" + file_path)
				tres_files.append(ResourceLoader.load(file_path))
			else:
				break

	for t in tres_files:
		monster_dict[t.monster_id] = t
